Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
			"pagePath": "/pages/home/home",
			"text": "首页",
			"iconPath": "/images/icon/index.png",
			"selectedIconPath": "/images/icon/index-selected.png"
		},{
			"pagePath": "/pages/other/other",
			"text": "我的",
			"iconPath": "/images/icon/center.png",
			"selectedIconPath": "/images/icon/center-selected.png"
    }],
    navs: [{
			name: '扫一扫',
			src: 'https://cdn.nlark.com/yuque/0/2019/png/280373/1568102197856-assets/web-upload/0a3840c5-1699-4507-b1d8-dfbbe0683fd0.png',
			url: "/pages/new/new"
		},
		{
			name: '酷图',
			src: 'https://cdn.nlark.com/yuque/0/2019/png/280373/1568102202109-assets/web-upload/93b53007-e782-47a2-ac84-c9ae854ed65d.png',
			url: "/pages/new/new"
		},
		{
			name: '应用集',
			src: 'https://cdn.nlark.com/yuque/0/2019/png/280373/1568102206687-assets/web-upload/6c417267-6d87-4337-be29-7299382d0251.png',
			url: "/pages/new/new"
		},
		{
			name: '动态',
			src: 'https://cdn.nlark.com/yuque/0/2019/png/280373/1568102210411-assets/web-upload/0dfed72c-fbe9-46d7-8ad2-15a8cab37aa9.png',
			url: "/pages/new/new"
		}],
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})